package com.qipay.mapper;

import com.qipay.baas.model.SpUser;
import com.qipay.core.entity.ValueObject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

import java.util.List;
import java.util.Map;

@Mapper
public interface SpUserMapper extends com.qipay.baas.mapper.SpUserMapper {
    @Select({
            "select * from sp_user a lEFT JOIN user b on a.name =b.name",
    })
    @Results({
            @Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER, id = true),
            @Result(column = "sp_user_name", property = "spUserName", jdbcType = JdbcType.VARCHAR),
            @Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR),
            @Result(column = "level", property = "level", jdbcType = JdbcType.INTEGER),
            @Result(column = "sex", property = "sex", jdbcType = JdbcType.TINYINT),
    })
    List<ValueObject> myQuery();
}
